﻿using FluentNHibernate.Mapping;

namespace DDDSample.Domain.NHibernate.Mappings
{
    public class HandlingEventMap : ClassMap<HandlingEvent.HandlingEvent>
    {
        public HandlingEventMap()
        {
            Id(x => x.Id).GeneratedBy.Guid();
            Map(x => x.EventType).Not.Nullable();
            Map(x => x.RegistrationDate).Not.Nullable();
            Map(x => x.CompletionDate).Not.Nullable();
            References(x => x.Cargo).Not.Nullable();
            References(x => x.Location).Not.Nullable();
        }
    }
}